﻿using NetBay.Core.DataAccess.Properties;

namespace NetBay.Core.DataAccess
{
    public enum ResultCode
    {
        //Common range: 0-99
        [ErrorMessage(typeof(Resources), "Executed")]
        Executed = 0,
        [ErrorMessage(typeof(Resources), "Error")]
        Error = -1,
        [ErrorMessage(typeof(Resources), "ExecutedWithError")]
        ExecutedWithError = -2,

        //Organization range: 200-299 
        [ErrorMessage(typeof(Resources), "Organization_WithSameNameExist")]
        Organization_WithSameNameExist = -200,
        [ErrorMessage(typeof(Resources), "Organization_WorkflowAttachedTo")]
        Organization_WorkflowAttachedTo = -201,

        //FolderType range: 300-399 
        [ErrorMessage(typeof(Resources), "FolderType_WithSameNameExist")]
        FolderType_WithSameNameExist = -300,
        [ErrorMessage(typeof(Resources), "FolderType_WorkflowAttachedTo")]
        FolderType_WorkflowAttachedTo = -301,

        //Index range: 400-499 
        [ErrorMessage(typeof(Resources), "Index_WithSameNameExist")]
        Index_WithSameNameExist = -400,
        [ErrorMessage(typeof(Resources), "Index_FolderNotDeletedAttachedTo")]
        Index_FolderNotDeletedAttachedTo = -401,
        [ErrorMessage(typeof(Resources), "Index_FolderAllDeleted")]
        Index_FolderAllDeleted = -402,
        [ErrorMessage(typeof(Resources), "Index_ValueInFolderForthisIndex")]
        Index_ValueInFolderForthisIndex = -403,
        [ErrorMessage(typeof(Resources), "Index_UpdMandatoryWithEmptyValues")]
        Index_UpdMandatoryWithEmptyValues = -404,
        [ErrorMessage(typeof(Resources), "Index_UpdLengthWithTooLongIndexValue")]
        Index_UpdLengthWithTooLongIndexValue = -405,
        [ErrorMessage(typeof(Resources), "Index_CannotBeMandatory")]
        Index_CannotBeMandatory = -406,
        [ErrorMessage(typeof(Resources), "Index_CannotBeUnique")]
        Index_CannotBeUnique = -407,

        //Index Values range: 500-599 
        [ErrorMessage(typeof(Resources), "IndexValue_WithSameNameExist")]
        IndexValue_WithSameNameExist = -500,
        [ErrorMessage(typeof(Resources), "IndexValue_FolderNotDeletedAttachedTo")]
        IndexValue_FolderNotDeletedAttachedTo = -501,
        [ErrorMessage(typeof(Resources), "IndexValue_FolderAllDeleted")]
        IndexValue_FolderAllDeleted = -502,

        //User range: 600-699 
        [ErrorMessage(typeof(Resources), "User_WithSameNameExist")]
        User_WithSameNameExist = -600,
        [ErrorMessage(typeof(Resources), "User_WithWorkflowAttached")]
        User_WithWorkflowAttached = -601,

        //Group range: 700-799 
        [ErrorMessage(typeof(Resources), "Group_WithSameNameExist")]
        Group_WithSameNameExist = -700,
        [ErrorMessage(typeof(Resources), "Group_WithWorkflowAttached")]
        Group_WithWorkflowAttached = -701,

        //Item range: 800-899
        [ErrorMessage(typeof(Resources), "Item_TopLevelReached")]
        Item_TopLevelReached = -800,
        [ErrorMessage(typeof(Resources), "Item_AddingError")]
        Item_AddingError = -801,
        [ErrorMessage(typeof(Resources), "Item_WithSameNameExist")]
        Item_WithSameNameExist = -802,
        [ErrorMessage(typeof(Resources), "Item_DeleteError")]
        Item_DeleteError = -801,
    }
}